/*
 * User.java
 *
 * Created on February 8, 2008, 8:50 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.myapp.form;

//import javax.servlet.http.HttpServletRequest;
//import org.apache.struts.action.ActionErrors;
//import org.apache.struts.action.ActionMapping;
//import org.apache.struts.action.ActionMessage;
//import org.apache.struts.action.ActionServlet;
//import org.apache.struts.util.MessageResources;
import org.apache.struts.validator.ValidatorForm;

/**
 *
 * @author JollkY
 */
public class User extends ValidatorForm {
    private String userid;
    private String password;
    /** Creates a new instance of User */
    public User() {
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
//    
//    @Override
//    public void reset(ActionMapping mappping,
//            HttpServletRequest request) {
//        ActionServlet srvt = this.getServlet();
//        MessageResources msgResources = srvt.getInternal();
//        msgResources.getMessage("pesan");
//        this.userid = "";
//        this.password = "";
//        System.out.println("RESET --->");
//    }
//    
//    @Override
//    public ActionErrors validate(ActionMapping mapping,
//            HttpServletRequest request) {
//            ActionErrors errorMsg = new ActionErrors();
//            if(this.userid.equalsIgnoreCase("") || this.password.equalsIgnoreCase("")) {
//                errorMsg.add("userid", new ActionMessage("errors.invalid"));
//            }
//            return errorMsg;
//    }
    
}
